package cevent.source.cloudcenter.business.controller.client;/**
 * Created by Cevent on 2021/8/7.
 */

import cevent.source.cloudcenter.server.dto.ResponseDataDto;
import cevent.source.cloudcenter.server.service.AddressService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cevent
 * @description 客户端获取城市
 * @date 2021/8/7 23:11
 */
@RestController
@RequestMapping("/client/address")
public class CilentAddressController {

    private static final Logger LOG= LoggerFactory.getLogger(ClientProductController.class);
    public static final String BUSINESS_NAME="客户端Address模块";

    @Resource
    private AddressService addressService;

    //返回前端tree型结构城市区域
    @RequestMapping("/tree")
    public ResponseDataDto getAreaTree(){
        ResponseDataDto responseData=new ResponseDataDto();
        responseData.setResponseData(addressService.getAreaListWithTree());
        return responseData;
    }
}
